package com.bh.wms.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bh.common.annotation.Excel;
import com.bh.common.core.domain.BhtmsBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.util.Date;
import java.util.List;

/**
 * 出库单
 *
 * @author GPT
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("wms_outbound_order")
@ApiModel(value = "出库单", description = "出库业务单据")
public class WmsOutboundOrder extends BhtmsBaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("出库单号")
    @Excel(name = "出库单号")
    private String orderNo;

    @ApiModelProperty("出库类型")
    @Excel(name = "出库类型")
    private String orderType;

    @ApiModelProperty("来源单号")
    @Excel(name = "来源单号")
    private String sourceOrderNo;

    @ApiModelProperty("货主ID")
    @Excel(name = "货主ID")
    private Long ownerId;

    @ApiModelProperty("仓库ID")
    @Excel(name = "仓库ID")
    private Long warehouseId;

    @ApiModelProperty("计划出库时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "计划出库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date planShipTime;

    @ApiModelProperty("实际出库时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际出库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date actualShipTime;

    @ApiModelProperty("拣货状态")
    @Excel(name = "拣货状态")
    private String pickStatus;

    @ApiModelProperty("出库状态 created/picking/shipping/completed/closed")
    @Excel(name = "出库状态")
    private String orderStatus;

    @ApiModelProperty("总件数")
    @Excel(name = "总件数")
    private Integer totalQuantity;

    @ApiModelProperty("总重量(kg)")
    @Excel(name = "总重量(kg)")
    private Double totalWeight;

    @ApiModelProperty("总体积(m³)")
    @Excel(name = "总体积(m³)")
    private Double totalVolume;

    @ApiModelProperty("配送方式")
    @Excel(name = "配送方式")
    private String deliveryMode;

    @ApiModelProperty("收货人")
    @Excel(name = "收货人")
    private String receiverName;

    @ApiModelProperty("收货电话")
    @Excel(name = "收货电话")
    private String receiverPhone;

    @ApiModelProperty("收货地址")
    @Excel(name = "收货地址")
    private String receiverAddress;

    @ApiModelProperty("外部物流单号")
    @Excel(name = "外部物流单号")
    private String logisticsNo;

    @ApiModelProperty("外部状态预留")
    private String externalStatus;

    @TableField(exist = false)
    @ApiModelProperty("出库明细")
    private List<WmsOutboundOrderDetail> details;
}

